<?php
$id=Yii::app()->request->getParam('id', 0);
$job=Job::model()->find('jid='.intval($id).' AND uid='.YII::app()->user->id);
if(empty($job)){
    $this->renderPartial('//site/error',array(
        'message'=>'此项隐藏功能,请从已发布的招聘信息列表进入',
        'direct'=>$this->createUrl('manage/index',array('cate'=>6)),
    ));
    return;
}

?>

<div class="detailContent" style="min-height: 1305px">
    <form method="post" action="<?php echo $this->createUrl('manage/upjob');?>">

        <table width="600" cellspacing="0" cellpadding="0" border="0" align="center" class="table2">
            <tbody><tr>
                <td width="17%" align="right">招聘职位：</td>
                <td width="83%">
                    <input type="text" id="textfield" class="text" name="Job[title]" value="<?php echo $job->title;?>" />
                    &nbsp;<span style=" color:#7f807b; font-size:12px;">限制20个字符以内</span></td>
            </tr>
            <tr>
                <td align="right">招聘人数：</td>
                <td><input type="text" id="textfield2" class="text120" name="Job[number]" value="<?php echo $job->number;?>" /></td>
            </tr>
            <tr>
                <td align="right">工作地点：</td>
                <td><input type="text" id="textfield3" class="text" name="Job[place]" value="<?php echo $job->place;?>" /></td>
            </tr>
            <tr>
                <td align="right">招聘时间：</td>
                <td>
                    <table width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tbody><tr>
                            <td width="170"><span style="color:#7f807b; font-size:12px;">起
                                <?php
                                $this->widget('zii.widgets.jui.CJuiDatePicker',array(
                                    'attribute'=>'stime',
                                    'language'=>'zh_cn',
                                    'name'=>'Job[stime]',
                                    'value'=> $job->stime,
                                    'options'=>array(
                                        'showAnim'=>'fold',
                                        'showOn'=>'both',
                                        'buttonImage'=>Yii::app()->request->baseUrl.'/images/date.gif',
                                        'buttonImageOnly'=>false,
                                        'dateFormat'=>'yy-mm-dd',
                                        'changeYear'=>true,
                                    ),
                                    'htmlOptions'=>array(
                                        'class'=>'text80',
                                        'readonly'=>'readonly',
                                        'value'=>$job->stime
                                    ),
                                ));
                                ?>
                                - -</td>
                            <td><span style="color:#7f807b; font-size:12px;">止</span>
                                <?php
                                $this->widget('zii.widgets.jui.CJuiDatePicker',array(
                                    'attribute'=>'etiem',
                                    'language'=>'zh_cn',
                                    'name'=>'Job[etime]',
                                    'value'=> $job->etime,
                                    'options'=>array(
                                        'showAnim'=>'fold',
                                        'showOn'=>'both',
                                        'buttonImage'=>Yii::app()->request->baseUrl.'/images/date.gif',
                                        'buttonImageOnly'=>false,
                                        'dateFormat'=>'yy-mm-dd',
                                        'changeYear'=>true,
                                    ),
                                    'htmlOptions'=>array(
                                        'class'=>'text80',
                                        'readonly'=>'readonly',
                                        'value'=>$job->etime
                                    ),
                                ));
                                ?></td>
                        </tr>
                        </tbody></table></td>
            </tr>
            <tr>
                <td align="right">薪资待遇： </td>
                <td><select name="Job[pay]">
                    <option value="">请选择</option>
                    <option <?php if(isset($job->pay) && $job->pay=='1000~2000'){
                        echo 'selected="selected"';
                    }?> value="1000~2000">1000~2000</option>
                    <option <?php if(isset($job->pay) && $job->pay=='2000~4000'){
                        echo 'selected="selected"';
                    }?> value="2000~4000">2000~4000</option>
                    <option <?php if(isset($job->pay) && $job->pay=='4000~6000'){
                        echo 'selected="selected"';
                    }?> value="4000~6000">4000~6000</option>
                    <option <?php if(isset($job->pay) && $job->pay=='6000~10000'){
                        echo 'selected="selected"';
                    }?> value="6000~10000">6000~10000</option>
                    <option <?php if(isset($job->pay) && $job->pay=='10000以上'){
                        echo 'selected="selected"';
                    }?> value="10000以上">10000以上</option>
                </select></td>
            </tr>
            <tr>
                <td align="right">工作性质：</td>
                <td><input type="radio" value="1" id="radio" name="Job[type]" <?php echo $job->type==1?'checked="checked"':'';?> />
                    <label for="radio"></label>
                    全职
                    <input type="radio" value="2" id="radio2" name="Job[type]" <?php echo $job->type==2?'checked="checked"':'';?>>
                    <label for="radio2"></label>
                    兼职</td>
            </tr>
            <tr>
                <td valign="top" align="right">职位要求：</td>
                <td><textarea class="texta" id="textfield6" rows="6" name="Job[require]"><?php echo $job->require;?></textarea></td>
            </tr>
            <tr>
                <td valign="top" align="right">职责描述：</td>
                <td><textarea class="texta" id="textfield7" rows="6" name="Job[desc]"><?php echo $job->desc;?></textarea></td>
            </tr>
            <tr>
                <td align="right">联系方式：</td>
                <td><input type="text" id="textfield8" class="text" name="Job[contact]" value="<?php echo $job->contact;?>" /></td>
            </tr>
            <tr>
                <td valign="top" align="right">其它说明：</td>
                <td><textarea id="textfield9" rows="6" class="texta" name="Job[other]"><?php echo $job->other;?></textarea></td>
            </tr>
            <tr>
                <td colspan="2">&nbsp;</td>
            </tr>
            </tbody></table>
        <input type="hidden" value="<?php echo $job->jid;?>" name="id">

        <div class="sq paddingbotton80 paddingtop50">
            <input id="tjshfb" type="submit" style="border: 0;height: 26px;font-size: 0;" value="提交审核并发布" />
        </div>

    </form>
</div>